class Solution(object):
    def findOriginalArray(self, changed):
        if len(changed) % 2 == 1:
            return []
        changed.sort()
        left_index = 0
        right_index = 1
        n = len(changed)
        used = [0] * n
        ans = []
        while right_index < n:
            if changed[right_index] == 2 * changed[left_index]:
                used[right_index] = 1
                used[left_index] = 1
                ans.append(changed[left_index])
                right_index += 1
                while left_index < n and used[left_index] == 1:
                    left_index += 1
                if left_index == right_index:
                    right_index += 1
            else:
                right_index += 1
        if len(ans) == n // 2:
            return ans
        else:
            return []
